Skip to content

[15.0][MIG] procurement_purchase_no_grouping: Migration to 15.0#1526

Merged
OCA-git-bot merged 26 commits intoOCA:15.0from
Tecnativa:15.0-mig-procurement_purchase_no_grouping
Jul 17, 2022
Merged

[15.0][MIG] procurement_purchase_no_grouping: Migration to 15.0#1526
OCA-git-bot merged 26 commits intoOCA:15.0from
Tecnativa:15.0-mig-procurement_purchase_no_grouping

Conversation

@cesar-tecnativa
Copy link
Copy Markdown
Contributor

@Tecnativa TT36490

alfredoavanzosc and others added 26 commits July 12, 2022 10:41
…ion to avoid problems on other searches made on same method
Currently translated at 100.0% (8 of 8 strings)

Translation: purchase-workflow-13.0/purchase-workflow-13.0-procurement_purchase_no_grouping
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-13-0/purchase-workflow-13-0-procurement_purchase_no_grouping/zh_CN/
When purchase grouping is set to no order grouping, the previously returned domain
ensured no other PO is found, but being the same domain for all will make that they
are grouped together in a batch operation, like the creation of all procurements
from a confirmed sales order.

Steps to reproduce:

* Create 2 products with MTO and different vendors.
* Add both in a sales order.
* Confirm the sales order.
* One purchase order is created for both products instead of 2, more even in this
  case that they have different vendors.

Fixes OCA#975
Steps to reproduce:

- Create a product with MTO route and "No line grouping" product
  category.
- Create an SO with such product and quantity = 1.
- Confirm it.
- A purchase order is created with such product and qty = 1.
- Edit the sales order, and change quantity = 2.

Current behavior:

A new purchase line is created with quantity = 2, having ordered 3 units
instead of 2.

Expected behavior:

The same existing purchase line is updated with quantity = 2.

------

For solving this problem, we are going to group by procurement group
instead of simply discarding any possible line grouping.

NOTE: This makes that if you manually assign the same procurement group
to several different sales orders, the grouping will be done no matter
the grouping criteria, but this is the only way to do it without having
to put a lot of glue modules, and on standard operation mode,
procurement groups are not reused between sales orders.

TT33031
@cesar-tecnativa
Copy link
Copy Markdown
Contributor Author

@CarlosRoca13 please review

@cesar-tecnativa
Copy link
Copy Markdown
Contributor Author

@Tardo can you review?

@cesar-tecnativa
Copy link
Copy Markdown
Contributor Author

@pedrobaeza could you please review?

@cesar-tecnativa
Copy link
Copy Markdown
Contributor Author

@sergio-teruel could you review?

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration procurement_purchase_no_grouping

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jul 16, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 16, 2022
78 tasks
class TestProcurementPurchaseNoGrouping(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestProcurementPurchaseNoGrouping, cls).setUpClass()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
super(TestProcurementPurchaseNoGrouping, cls).setUpClass()
super().setUpClass()

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-1526-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 527c010 into OCA:15.0 Jul 17, 2022
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 6d4268d. Thanks a lot for contributing to OCA. ❤️

bealdav pushed a commit to akretion/purchase-workflow that referenced this pull request Feb 29, 2024
Signed-off-by pedrobaeza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.